﻿#region using statements

using System;
using System.Collections.Generic;

#endregion

namespace XNAGameEngine.GameObject
{
    /// <summary>
    /// Interface for the IManagerGameObjects2D
    /// </summary>
    public interface IManagerGameObject2D
    {
        /// <summary>
        /// Checks to make sure an object exists
        /// </summary>
        /// <param name="objectId">the id number of the object to check</param>
        /// <returns>true if the object is in the registry, false otherwise</returns>
        bool GameObjectExists(int objectId);

        /// <summary>
        /// Returns the object if it exists
        /// </summary>
        /// <param name="objectId">the object id</param>
        /// <returns>the object whose id was passed in</returns>
        GameObject2D GetGameObjectById(int objectId);

        /// <summary>
        /// <para>Register a new game object in the registry.</para>
        /// <para>By default, objects are set as ACTIVE</para>
        /// </summary>
        /// <param name="newObjectKey">
        /// <para>The key value registered to the object to create</para>
        /// <para>It MUST inherit the base GameObject2D class or an exception will be thrown.</para>
        /// <para>EXAMPLE: RegisterNewGameObject("SuperAwesomeBadGuy");</para>
        /// <returns>the unique object id number associated with the new object</returns>
        int CreateGameObject(string newObjectKey);

        /// <summary>
        /// Returns a list containing all of the unique object identifiers 
        /// </summary>
        /// <returns>the list of all unique object identifiers</returns>
        List<int> GetGameObjectIdList();

        /// <summary>
        /// Destroy all of the objects in the manager
        /// </summary>
        void DestroyAllGameObjects();

        /// <summary>
        /// Destroys a specific game object
        /// </summary>
        /// <param name="objectId">the id of the game object to destroy</param>
        void DestroyGameObjectById(int objectId);

        /// <summary>
        /// <para>Register a GameObject2D</para>
        /// <para>IMPORTANT NOTICE: GAMEOBJECT2D OBJECT CONSTRUCTS MUST ONLY CONTAIN THE OBJECTID AS A CONSTRUCTOR PARAMETER.
        /// </para>
        /// <para>AN EXCEPTION WILL BE THROWN OTHERWISE</para>
        /// </summary>
        /// <param name="gameObject">the GameObject2D type to register</param>
        void RegisterGameObject(string key, Type newObjectType);
    }
}